#define _CRT_SECURE_NO_WARNINGS 1

#include "contact.h"

void WriteContact(contact* pc)
{
	FILE* pf = fopen("contact.txt", "w");
	if (NULL == pf)
	{
		perror("fopen--write");
		return;
	}
	int i = 0;
	for (i = 0; i < pc->sz; i++)
	{
		fwrite(&pc->peo[i], sizeof(pe_info), 1, pf);
	}
	fclose(pf);
	pf = NULL;

	return 0;
}